<style>
    #edit-title{
        width:100%;
        text-align:center;
        background-color:#5dc2f1;
        height:30px;
        color:#ffffff;
        line-height:30px;
    }
    #edit-content{
        background-color:#ffffff;
        margin-left:0;
        margin-right:0;
    }
    .ngdialog.ngdialog-theme-default .ngdialog-content{
        width:70%!important;
    }
    #time-picker{
        margin-top:20px;
    }
    .btn-active{
        background-color:#0be386;
    }
    .edit-element{
        border-bottom: solid 1px #CCCCCC;
        height:40px;
        line-height:40px;
    }
    #edit-select-content{
        height:460px;
        overflow-x:hidden;
        overflow-y:auto;
    }
</style>
<div id="editClip" class="ngdialog ngdialog-theme-default ng-scope" role="alertdialog">
    <div class="ngdialog-overlay">
    </div>
    <div class="ngdialog-content" role="document" style="padding:0 0 0 0">
        <div id="edit-title">新建日程</div>
        <div style="width:100%;padding:1em" class="row" id="edit-content">
            <div class="col-md-8">
                <textarea rows="3" placeholder="请输入事项内容" style="width:100%;background-color:#DEDEDE;border:0" ng-model="clip.name"></textarea>
                <div id="time-picker" class="row">
                    <div class="col-md-5">
                        <input ng-show="option!=4&&option!=5" type="datetime-local" class="form-control" ng-model="clip.startTime"/>
                        <input ng-show="option==4||option==5" type="date" class="form-control" ng-model="clip.startTime"/>
                    </div>
                    <div class="col-md-2" style="text-align:center"><i class="fa fa-angle-double-right"></i></div>
                    <div class="col-md-5">
                        <input ng-show="option!=4&&option!=5" type="datetime-local" class="form-control" ng-model="clip.endTime"/>
                        <input ng-show="option==4||option==5" type="date" class="form-control" ng-model="clip.endTime"/>
                    </div>
                </div>
                <hr/>
                <div ng-show="option!=3&&option!=4" class="row edit-select">
                    <div class="col-md-2"></div>
                    <div class="col-md-4"><button class="{{clip.isSecret==0?'btn btn-active':'btn btn-default'}}" style="width:100%" ng-click="clip.isSecret=0">私密</button></div>
                    <div class="col-md-4"><button class="{{clip.isSecret==2?'btn btn-active':'btn btn-default'}}" style="width:100%" ng-click="clip.isSecret=2">公务</button></div>
                    <div class="col-md-2"></div>
                </div>
                <div ng-show="option!=3" class="row edit-element" ng-click="changeSelectDisplay(1)">
                    <div class="pull-left">关联人</div>
                    <div class="pull-right">{{returnContactId(2)}}&nbsp;&nbsp;<i class="fa fa-angle-right"></i></div>
                </div>
                <div ng-show="option!=3" class="row edit-element" ng-click="changeSelectDisplay(2)">
                    <div class="pull-left">关联机会</div>
                    <div class="pull-right">{{returnOppId(2)}}&nbsp;&nbsp;<i class="fa fa-angle-right"></i></div>
                </div>
                <div class="row edit-element" ng-click="changeSelectDisplay(3)">
                    <div class="pull-left">重要程度</div>
                    <div class="pull-right">{{returnImportance()}}&nbsp;&nbsp;<i class="fa fa-angle-right"></i></div>
                </div>
                <div ng-show="option!=3&&option!=4" class="row edit-element" ng-click="changeSelectDisplay(4)">
                    <div class="pull-left">提醒时间</div>
                    <div class="pull-right">{{displayRemindString()}}&nbsp;&nbsp;<i class="fa fa-angle-right"></i></div>
                </div>
                <div class="row" style="margin-top:40px">
                    <div class="col-md-1"></div>
                    <div class="col-md-4"><button class="btn btn-success" style="width:100%" ng-click="saveEdit()">保存</button></div>
                    <div class="col-md-2"></div>
                    <div class="col-md-4"><button class="btn btn-default" style="width:100%" ng-click="cancelEdit()">取消</button></div>
                    <div class="col-md-1"></div>
                </div>
            </div>
            <div class="col-md-4" id="edit-select-content">
                <div ng-show="selectDisplay==1">
                    <input class="form-control" ng-model="searchUserContactName" placeholder="联系人搜索"/>
                    <table class="datatable table table-hover dataTable">
                        <tbody>
                        <tr ng-repeat="item in userContact|filter:searchUserContactName" ng-click="choseThisContact(item.name,item.id)">
                            <td style="width:50%">{{item.name}}</td>
                            <td style="width:50%"><i ng-show="returnContactId(1)==item.id" class="fa fa-check"></i></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div ng-show="selectDisplay==2">
                    <input class="form-control" ng-model="searchUserOppName" placeholder="机会搜索"/>
                    <table class="datatable table table-hover dataTable">
                        <tbody>
                        <tr ng-repeat="item in userOpp|filter:searchUserOppName" ng-click="choseThisOpp(item.name,item.id)">
                            <td style="width:50%">{{item.name}}</td>
                            <td style="width:50%"><i ng-show="returnOppId(1)==item.id" class="fa fa-check"></i></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div ng-show="selectDisplay==3">
                    <table class="datatable table table-hover dataTable">
                        <tbody>
                        <tr ng-repeat="item in importantList" ng-click="clip.isImportant=item.value">
                            <td style="width:50%">{{item.name}}</td>
                            <td style="width:50%"><i ng-show="clip.isImportant==item.value" class="fa fa-check"></i></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div ng-show="selectDisplay==4">
                    <table class="datatable table table-hover dataTable">
                        <tbody>
                        <tr ng-repeat="item in remindList" ng-click="choseThisRemind(item.value)">
                            <td style="width:50%">{{item.name}}</td>
                            <td style="width:50%"><i ng-show="checkRemindList(item.value)==1" class="fa fa-check"></i></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>


        </div>
    </div>
</div>
